<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .header {
            /* 给一个最小值，让它放大后依然包含版心，如果还想要左右间距就把最小宽度设为大于版心的宽度 */
            min-width: 1500px;
            height: 100px;
            background-color: pink;
        }
        
        .w {
            width: 1200px;
            height: 50px;
            margin: 0 auto;
            background-color: purple;
        }
        
        ul {
            float: right;
            width: 500px;
            height: 40px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div class="header">
        <div class="w">
            <ul>
            </ul>
        </div>
    </div>
</body>

</html>